package main

import (
	"fmt"
	"math"
)

type Verte struct {
	X float64
	Y float64
}

func (v Verte) Abs() float64 {
	return math.Sqrt(v.X*v.X + v.Y*v.Y)
}
func (v Verte) valueChange() float64 {
	v.X += 1
	return v.X
}

func (v *Verte) pointerChange() float64 {
	v.X += 1
	return v.X
}

func main() {
	v := Verte{1, 2}
	v.Abs()
	v = Verte{1, 2}
	fmt.Println(v.valueChange()) // 2
	// {1 2}
	fmt.Println(v)

	v = Verte{1, 2}
	fmt.Println(v.pointerChange()) // 2
	// {2 2}
	fmt.Println(v)
}
